<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        
        function daxiao(arr){
            if(arr[0]<arr[1]){
                temp=arr[0];
                arr[0]=arr[1];
                arr[1]=temp;
            }
            if(arr[0]<arr[2]){
                temp=arr[2];
                arr[0]=arr[2];
                arr[2]=temp;
            }
            if(arr[1]<arr[2]){
                temp=arr[1];
                arr[1]=arr[2];
                arr[2]=temp;
            }
            
        }
        var a =[1,9,5];
        daxiao(a);
        console.log(a)
        var b=[9,1,7]
        daxiao(b)
        console.log(b)
    </script>
    
</body>
</html>